﻿<Window x:Class="Brjnk.GpxExplorer.UI.ImportAllGCsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:l="clr-namespace:Brjnk.GpxExplorer.Localization"
        Title="{l:Loc titleImportAllGCs}" MinHeight="150" MinWidth="300" Width="350" Height="200">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <ListView Name="lv" Grid.ColumnSpan="2">
            <ListView.View>
                <GridView>
                    <GridViewColumn>
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <CheckBox IsChecked="{Binding IsSelected}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                    <GridViewColumn Header="{l:Loc importAllGCsCode}"  DisplayMemberBinding="{Binding Geocache.GcCode}" />
                    <GridViewColumn Header="{l:Loc importAllGCsName}"  DisplayMemberBinding="{Binding Geocache.Info.Name}" />
                    <GridViewColumn Header="{l:Loc importAllGCsAction}">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Grid>
                                    <TextBlock Text="{l:Loc importAllGCsImport}">
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock">
                                            <Setter Property="Visibility" Value="Collapsed" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Type}" Value="Import">
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                    </TextBlock>
                                    <TextBlock Text="{l:Loc importAllGCsUpdate}">
                                    <TextBlock.Style>
                                        <Style TargetType="TextBlock">
                                            <Setter Property="Visibility" Value="Collapsed" />
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding Type}" Value="Update">
                                                    <Setter Property="Visibility" Value="Visible" />
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </TextBlock.Style>
                                    </TextBlock>
                                </Grid>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <Button HorizontalAlignment="Right" Grid.Row="1" Content="{l:Loc cancel}" Click="Button_Click" />
        <Button HorizontalAlignment="Right" Grid.Row="1" Grid.Column="1" Content="{l:Loc ok}" Click="Button_Click_1" />
    </Grid>
</Window>